/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package game.writer;

import java.io.File;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;

/**
 *
 * @author sleep
 */
public class FileWrite implements Writer {
    private final FileOutputStream file;
    
    public FileWrite(String name) throws IOException {
        this.file = new FileOutputStream(name);
    }
    
    public void print(String str) {
        str = str + "\r\n";
        try {
            file.write(str.getBytes());
        } catch (IOException ex) {
            ex.printStackTrace();
        }
    }
}
